package com.yoomiito.app.widget.songduoduo

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import cn.droidlover.xdroidmvp.net.ApiException
import cn.droidlover.xdroidmvp.net.ApiSubscriber
import cn.droidlover.xdroidmvp.net.BaseModel
import cn.droidlover.xdroidmvp.net.XApi
import com.yoomiito.app.R
import com.yoomiito.app.model.sdd.SddFreeGoodsOrderInfo
import com.yoomiito.app.model.sdd.SddUserData
import com.yoomiito.app.net.YmApi
import kotlinx.android.synthetic.main.view_giver_info.view.*

class GiverInfoView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, defStyleRes: Int = 0)
    :LinearLayout(context, attrs, defStyleAttr, defStyleRes){
    private val view = LayoutInflater.from(context).inflate(R.layout.view_giver_info,null,false)
    init {
        val lp = LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT)
        addView(view,lp)
    }

    fun updateUserData(data: SddUserData){
        giverDataView.updateData(data)
        giverListView.updateData()
    }



}